<html>
<body>
<div id="header">
<p style="font-family: Times New Roman, serif; font-size: 45pt; padding-top: 17px;">
Listing Utility Settings
</p>
</div>

<div id="main">

<!-- Not used in the Army version. -->
<table>
  <tr>
    <th id="medium">Peak Start</th>
    <th id="medium"> Peak End</th>
    <th id="medium"> Peak Price</th>
    <th id="medium"> Off-Peak Price</th>
    <th id="medium">Override Level</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @utility_settings.each do |utility_setting| %>
  <tr>
    <td id="medium"><%= utility_setting.peak_start.strftime("%X") %></td>
    <td id="medium"><%= utility_setting.peak_end.strftime("%X") %></td>
    <td id="medium">$<%= utility_setting.peak_price %>0/kWh</td>
    <td id="medium">$<%= utility_setting.off_peak_price %>0/kWh</td>
    <td id="medium"><%= if utility_setting.override_lvl == 1
  		'Engage Full Control'
  	  elsif utility_setting.override_lvl == 2
  	  	'Engage Control Over Priority 2 & 3'
  	  elsif utility_setting.override_lvl == 3
  	  	'Engage Control Over Priority 3'
  	  elsif utility_setting.override_lvl == 4
  	  	'Override Off'
  	  end %></td>
    <td id="medium"><%= link_to 'Show', utility_setting %></td>
    <td id="medium"><%= link_to 'Edit', edit_utility_setting_path(utility_setting) %></td>
    <td id="medium"><%= link_to 'Destroy', utility_setting, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />
<div id="footer">
<%= link_to 'New Utility Setting', new_utility_setting_path %><br /><br />
<p>
<%= link_to 'User Settings |', user_settings_path %>
Utility Settings |
<%= link_to 'Outlet Statuses', outlet_statuses_path %>
</p>
</div>
</body>
</html>
